package jpa.entitys.promis.common;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the UM_CONVERSION database table.
 * 
 */
@Embeddable
public class UmConversionPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(unique=true, nullable=false, length=30)
	private String um;

	@Column(name="MASTER_UM", unique=true, nullable=false, length=30)
	private String masterUm;

    public UmConversionPK() {
    }
	public String getUm() {
		return this.um;
	}
	public void setUm(String um) {
		this.um = um;
	}
	public String getMasterUm() {
		return this.masterUm;
	}
	public void setMasterUm(String masterUm) {
		this.masterUm = masterUm;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof UmConversionPK)) {
			return false;
		}
		UmConversionPK castOther = (UmConversionPK)other;
		return 
			this.um.equals(castOther.um)
			&& this.masterUm.equals(castOther.masterUm);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.um.hashCode();
		hash = hash * prime + this.masterUm.hashCode();
		
		return hash;
    }
}